package filter

import (
	"github.com/beego/beego/v2/server/web/filter/cors"
)

// 处理跨域
var CorsFilter =  cors.Allow(&cors.Options{
	AllowAllOrigins: true,
	AllowMethods: []string{"GET", "POST", "OPTIONS", "PUT", "PATCH", "DELETE", "UPDATE"},
	AllowHeaders:  []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "content-type"},
	ExposeHeaders: []string{"Content-Length","Access-Control-Allow-Headers"},
	AllowCredentials: true,
})